import { StyleSheet, Text, View, Image, Button } from "react-native";
import React from "react";

const Card = (props) => {
  return (
    <View style={styles.Card}>
      <Image
        source={{
          uri: props.item.findimg,
        }}
        style={styles.image}
      ></Image>
      <View style={styles.Cardcontent}>
        <View style={styles.Cardcontenttitle}>
          <Text>{props.item.findtitle}</Text>
          <Button title="+关注" color={"#0079fe"} />
        </View>
        <View style={styles.Cardcontenttext}>
          <Text>
            我们经常会根据部门来录入每个销售人员的销售业绩，然后求出每个部门.
          </Text>
        </View>
      </View>
    </View>
  );
};

export default Card;

const styles = StyleSheet.create({
  image: {
    width: 120,
    height: 90,
  },
  Card: {
    width: "100%",
    height: 120,
    backgroundColor: "white",
    display: "flex",
    flexDirection: "row",
    alignItems: "center",
    justifyContent: "space-around",
    fontSize: 14,
    marginTop: 10,
  },
  Cardcontent: {
    width: "70%",
    height: 120,
    backgroundColor: "white",
    display: "flex",
    flexDirection: "column",
    alignItems: "center",
    justifyContent: "space-around",
    boxSizing: "border-box",
    padding: 10,
  },
  Cardcontenttitle: {
    display: "flex",
    justifyContent: "space-between",
    width: "100%",
    flexDirection: "row",
    fontWeight: "bold",
    lineHeight: 15,
  },
  Cardcontenttext: {
    color: "#999",
    lineHeight: 25,
  },
});
